package Clases;

import mutationMethods.ExchangeMutator;
import mutationMethods.Mutator;
import objectiveFunctions.CollisionFitnessFunction;
import objectiveFunctions.GeneticFitnessFunction;
import replacementMethods.Replacement;
import replacementMethods.WeakParentReplacement;
import selectionMethods.RouletteSelector;
import selectionMethods.Selector;
import stoppingCriteria.FitnessValueCriteria;
import stoppingCriteria.GeneticStoppingCriterion;
import crossingMethods.Cruza;
import crossingMethods.DPCrossover;
import crossingMethods.Reproductor;
import exceptions.ExceptionWrongParameterClass;
import genetic.Genetic;

public class Main {
	
	
	public static void main(String [] args){
	
	int populationSize=20;
	int chromosomeSize=64;
	int geneSize=8;
	double mutationRate=0.125;
	double crossingRate=0.8;
	String chromosomeRepresentation="ArithmeticChromosome";		
	String populationStrategy="GenerationalPopulation";		
	Selector selectionStrategy= (Selector) new RouletteSelector();	
	Reproductor reproductionStrategy = (Reproductor) new Cruza();
	Mutator mutationStrategy = (Mutator) new ExchangeMutator();
	GeneticStoppingCriterion stoppingCriteria = (GeneticStoppingCriterion) new FitnessValueCriteria();
	double valueStopCriteria=0;
	int lowerRange=0;	
	int topRange=1;		
	GeneticFitnessFunction fitnessFunction= (GeneticFitnessFunction) new Fitness();
	Replacement replacementStrategy = (Replacement) new WeakParentReplacement();		
			
			
		
	try
	{
	Genetic genet = new Genetic (populationSize,chromosomeSize, geneSize,mutationRate, crossingRate, chromosomeRepresentation,populationStrategy, selectionStrategy,reproductionStrategy, 
		mutationStrategy, stoppingCriteria, valueStopCriteria,lowerRange, topRange, fitnessFunction,replacementStrategy);
	}
	catch (ExceptionWrongParameterClass e) 
	{ 
	}

	
  }
}
